#include "application.h"

namespace WinApp
{
	HINSTANCE Application::hInst=NULL;

	Application::Application(HINSTANCE hInstance)
	{
		hInst=hInstance;
	}

	Application::~Application(void)
	{
	}

	int Application::run()
	{
		MSG msg;
		ZeroMemory( &msg, sizeof( msg ) );
		while( msg.message!=WM_QUIT )
		{
			// Check the message queue
			if (PeekMessage(&msg, NULL, 0, 0,PM_REMOVE) )
			{
				TranslateMessage( &msg );
				DispatchMessage( &msg );
			}
			else
				render();

		}
		return (int)msg.wParam;
	}
}